home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / v9n13.arc / WHATCPU.SCR < prev    next >
Text File  |  1990-06-14  |  1KB  |  50 lines

  1. A 0100
  2. JMP  0123
  3. DB   0D,0A,"CPU is an 80$"
  4. DB   "86$"
  5. DB   "286$"
  6. DB   "386$"
  7. DB   "486$"
  8. DB   0D,0A,"$"
  9. MOV  AH,09               ;Print opening message
  10. MOV  DX,0102
  11. INT  21
  12. MOV  DX,0111             ;Test for 8088/8086
  13. PUSH SP
  14. POP  AX
  15. CMP  SP,AX
  16. JNZ  0166                ;Branch if test positive
  17. MOV  DX,0114             ;Test for 286
  18. PUSHF
  19. POP  AX
  20. OR   AX,4000
  21. PUSH AX
  22. POPF
  23. PUSHF
  24. POP  AX
  25. TEST AX,4000
  26. JZ   0166                ;Branch if test positive
  27. MOV  DX,0118             ;Separate 386s from 486s
  28. DB   0F,20,C0            ;mov eax,cr0
  29. DB   66,8B,D8            ;mov ebx,eax
  30. DB   66,35,00,00,00,20   ;xor eax,20000000
  31. DB   0F,22,C0            ;mov cr0,eax
  32. DB   0F,20,C0            ;mov eax,cr0
  33. DB   66,3B,C3            ;cmp eax,ebx
  34. DB   0F,84,06,00         ;je  0166
  35. DB   BA,1C,01            ;mov dx,011C
  36. DB   0F,22,C3            ;mov cr0,ebx
  37. MOV  AH,09               ;Print CPU type
  38. INT  21
  39. MOV  AH,09               ;Terminate line and exit
  40. MOV  DX,0120
  41. INT  21
  42. RET
  43.  
  44. N WHATCPU.COM
  45. RCX
  46. 72
  47. W
  48. Q
  49.  
  50.